package com.example.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.entity.ModulesEntity;
import com.example.entity.ModulesTreeNode;
import com.example.mapper.ModulesMapper;
import com.example.service.ModulesServlice;

@Service
public class ModulesServiceImpl implements ModulesServlice{

	@Autowired
	private ModulesMapper modulesMapper;
	
	@Override
	public List<ModulesTreeNode> find(String rolesIds) {
		// TODO Auto-generated method stub
		return modulesMapper.find(rolesIds);
	}

	@Override
	public int addModules(ModulesEntity modules) {
		// TODO Auto-generated method stub
		return modulesMapper.addModules(modules);
	}

	@Override
	public int upModules(ModulesEntity modules) {
		// TODO Auto-generated method stub
		return modulesMapper.upModules(modules);
	}

	@Override
	public int delModules(Integer id) {
		// TODO Auto-generated method stub
		return modulesMapper.delModules(id);
	}

	@Override
	public List<ModulesEntity> findAll(String name) {
		// TODO Auto-generated method stub
		return modulesMapper.findAll(name);
	}

	@Override
	public List<ModulesTreeNode> findRM(Integer id) {
		// TODO Auto-generated method stub
		return modulesMapper.findRM(id);
	}

}
